//
// Created by rengen.gong on 2021/12/21.
//

#ifndef LEARN1_DYNAMICARR_H
#define LEARN1_DYNAMICARR_H

#include "iInvoke.h"

class DynamicArr :
        public virtual iInvoke {

    void invoke() {

        char *sPtr;
        const char *s = "heloo";
        std::cout << "len=" << strlen(s) << std::endl;
        sPtr = new char[strlen(s) + 1];
        strncpy(sPtr, s, strlen(s));
        std::cout << sPtr << std::endl;
        delete sPtr;

    }

public:

};

#endif //LEARN1_DYNAMICARR_H
